package string;
/**
 * replaceAll()：替换，将当前字符串中满足正则表达式的部分给替换为指定字符串
 */
public class ReplaceAllDemo {
    public static void main(String[] args) {
        String line = "qwe123abc456efg78";
        line = line.replaceAll("[0-9]+","***");
        System.out.println(line);

        String s = "hg6778jttj樱满集6577hfgr45jrt5";
        s = s.replaceAll("\\w","*");
        System.out.println(s);

       /* String line = "qqruwdnmdolhp樱jgfhfd满ff花Qftgf集ffsd";
        line = line.replaceAll("[wdnmd|花Q]+","***");
        System.out.println(line);*/
    }
}
